package com.ruoyi.project.modules.frontInterfaceFieldSource.domain;

import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.List;

/**
 * 前端接口字段来源对象 t_front_interface_field_source
 *
 * @author smallrain
 * @date 2022-05-03
 */
@Data
public class FrontInterfaceFieldSource extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    private Long id;

    /**
     * 页面id
     */
    @Excel(name = "页面id")
    private Long pageId;

    /**
     * 页面图片id
     */
    @Excel(name = "页面图片id")
    private Long pageImgId;

    /**
     * 接口id
     */
    @Excel(name = "接口id")
    private Long interfaceId;

    /**
     * 类型：1-t_interface_params_field_relation 2-t_params_field_relation
     */
    @Excel(name = "类型：1-t_interface_params_field_relation 2-t_params_field_relation")
    private String objectType;

    /**
     * 字段id
     */
    @Excel(name = "字段id")
    private Long objectId;

    /**
     * 来源类型：1-来源接口 2-来源约定值 3-来源前端本地
     */
    @Excel(name = "来源类型：1-来源接口 2-来源约定值 3-来源前端本地")
    private String sourceType;

    /**
     * 来源接口id
     */
    @Excel(name = "来源接口id")
    private Long sourceInterfaceId;

    /**
     * 来源字段（数据集）id
     */
    @Excel(name = "来源字段", readConverterExp = "数=据集")
    private Long sourceObjectId;

    /**
     * 来源数据集字段id
     */
    @Excel(name = "来源数据集字段id")
    private Long sourceObjectFieldId;

    /**
     * 约定值类型（1-类型编码 2-关联表名 3-关联表主键名 4-对象属性code 5-对象属性值（固定值）
     */
    @Excel(name = "约定值类型", readConverterExp = "1=-类型编码,2=-关联表名,3=-关联表主键名,4=-对象属性code,5=-对象属性值（固定值")
    private String contractValueType;

    /**
     * 字典值
     */
    @Excel(name = "字典值")
    private String dictValue;

    /**
     * 表id或者主键字段id
     */
    @Excel(name = "表id或者主键字段id")
    private Long tableOrFieldId;

    /**
     * 表或者主键字段名称
     */
    @Excel(name = "表或者主键字段名称")
    private String tableOrFieldName;

    /**
     * 自定义约定值
     */
    @Excel(name = "自定义约定值")
    private String contractValue;

    /**
     * 1-localStorage 2-全局Storage 3页面
     */
    @Excel(name = "1-localStorage 2-全局Storage 3页面")
    private String storageType;
    private String sourceInterfaceUrl;
    private String sourceObjectName;
    private String sourceObjectFieldName;
    private String isPageStore;
    private String dictType;
    private String sourceInterfaceName;
    private String sourceObjectFieldEnName;
    private String sourceObjectEnName;
    private Long sourcePageImgId;
    private String dictCategory;
    private String sourceDictType;
    private String sourceDictValue;

    private List<Long> pageIds;
}